package slution2;

import java.util.Scanner;

public class Solution {

	private static final String INVALID = "Invalid";

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		while (scanner.hasNextLine()) {
			String arrayString = scanner.nextLine();
			if (arrayString != null && arrayString.length() > 0) {
				String[] result = arrayString.split("[,|;|\\s]+");
				if (result.length >= 2) {
					int[] integerArray = new int[result.length - 1];
					for (int i = 0; i < result.length - 1; i++) {
						integerArray[i] = Integer.parseInt(result[i]);
					}
					createEquationAndPrint(integerArray,
							Integer.parseInt(result[result.length - 1]));
					System.out.print("\n");
				}
			} else {
				break;
			}
		}
	}

	// your function code is here
	// the last array element is equation result
	static void createEquationAndPrint(int[] array, int result) {
		boolean[] bs = run(result, array[0], array, 1);
		if (bs == null) {
			System.out.print(INVALID);
		} else {
			System.out.print(array[0]);
			for (int i = 1; i < array.length; i++) {
				System.out.print(bs[i - 1] ? '+' : '-');
				System.out.print(array[i]);
			}
			System.out.print('=');
			System.out.print(result);
		}
	}

	static boolean[] run(int result, int start, int[] array, int offset) {
		if (offset < array.length) {
			boolean[] bs = run(result, start + array[offset], array, offset + 1);
			if (bs != null) {
				bs[offset - 1] = true;
				return bs;
			}
			bs = run(result, start - array[offset], array, offset + 1);
			if (bs != null) {
				bs[offset - 1] = false;
				return bs;
			}
			return null;
		} else {
			if (start == result) {
				return new boolean[array.length - 1];
			} else {
				return null;
			}
		}
	}
}